<?php
namespace App\Models\Admin;

use Illuminate\Support\Facades\Config;

class AdminAction extends Common {
	protected $table = 'admin_action';

	/**
	 * 获取某个操作的记录列表
	 */
	public function getActionList($action=''){
		$where = [];
		if($action){
			$where[] = ['action' , 'like' , '%'.$action.'%'];
		}
		$data = $this->where($where)->orderBy('action_id','desc')->paginate(Config::get('app.pagesize'));
		return $data;
	}
}